/*
 * Group:PrePool K9-357 
 * 8/2010
 */
package blo;

import java.util.List;

import util.Constants;
import dao.ManagerInDictDAO;
import dto.ManagerDictDTO;

/**
 *
 */
public class ManagerindictBLO {
	private ManagerInDictDAO managerindictDAO = new ManagerInDictDAO();

	/**
	 * @param username
	 *            approver's name
	 * @return list of dictionaries that approver has privileges
	 */
	public List<ManagerDictDTO> getApproverManagement(String username) {
		return managerindictDAO
				.getManagement(username, Constants.ROLE_APPROVER);
	}

	/**
	 * @param username
	 *            viewer's name
	 * @return list of dictionaries that viewer has privileges
	 */
	public List<ManagerDictDTO> getReviewerManagement(String username) {
		return managerindictDAO
				.getManagement(username, Constants.ROLE_REVIEWER);
	}

	/**
	 * @param username
	 *            name of user
	 * @param dictID
	 *            ID of dictionary
	 * @return role of user on that dictionary
	 */
	public int getRole(String username, int dictID) {
		return managerindictDAO.getRole(username, dictID);
	}
}
